<%--
  Created by IntelliJ IDEA.
  User: 凤与泥
  Date: 2021/4/27
  Time: 11:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>学生管理系统首页</title>
</head>
<body>

<%--获取会话域对象，eq比较是否为空--%>
    <c:if test="${sessionScope.username eq null}">
        <a href="/login.jsp">请登录</a>
    </c:if>
<%--获取会话域对象，ne判断是否为不空--%>
    <c:if test="${sessionScope.username ne null}">
        <a href="${pageContext.request.contextPath}/addStudent.jsp">添加学生</a>
        <a href="${pageContext.request.contextPath}/listStudentServlet">查看学生</a>
    </c:if>


</body>
</html>
